<%@ include file="/common/taglibs.jsp" %>
<c:set var="url"><spring:url value="/orders/maintainPostalOrderPayment.html"/></c:set>
<c:set var="goToPreviousPathUrl"><spring:url value="${paymentDto.previousPath}" /> </c:set>
<head>
	<title><spring:message code="orders.payment.postalOrder.header"/></title>
	<script type="text/javascript">
	$(function(){
		$("#goToPreviousPath").click(function(){
			location.assign("${goToPreviousPathUrl}");
		});

	});
	</script>
</head>
<p>
	<spring:message code="orders.payment.postalOrder.header"/>
</p>
<form:form commandName="paymentDto" method="post" action="${url}">
	<table>
		<%@ include file="/WEB-INF/pages/orders/maintainPayment.jsp" %>
		<tr>
			<th><label for="receiverName"><spring:message code="orders.payment.postalOrder.receiverName"/></label></th>
			<td><form:input id="receiverName" path="receiverName"/>
			<form:errors path="receiverName" cssClass="fieldError"/></td>
		</tr>
		<tr>
			<th><label for="payerName"><spring:message code="orders.payment.postalOrder.payerName"/></label></th>
			<td><form:input id="payerName" path="payerName"/>
			<form:errors path="payerName" cssClass="fieldError"/></td>
		</tr>
		<tr>
			<th><label for="address"><spring:message code="orders.payment.postalOrder.address"/></label></th>
			<td><form:input id="address" path="address"/>
			<form:errors path="address" cssClass="fieldError"/></td>
		</tr>
		<tr>
			<th><label for="phoneNumber"><spring:message code="orders.payment.postalOrder.phoneNumber"/></label></th>
			<td><form:input id="phoneNumber" path="phoneNumber"/>
			<form:errors path="phoneNumber" cssClass="fieldError"/></td>
		</tr>
		<tr>
			<th><label for="depositBankId"><spring:message code="orders.payment.postalOrder.depositBankId"/></label></th>
			<td><form:input id="depositBankId" path="depositBankId" maxlength="3"/>
			<form:errors path="depositBankId" cssClass="fieldError"/></td>
		</tr>
		<tr>
			<th><label for="depositAccountNumber"><spring:message code="orders.payment.postalOrder.depositAccountNumber"/></label></th>
			<td><form:input id="depositAccountNumber" path="depositAccountNumber" maxlength="16"/>
			<form:errors path="depositAccountNumber" cssClass="fieldError"/></td>
		</tr>
		<tr>
			<td colspan="2">
				<button id="submit" type="submit" class="aButton"><spring:message code="orders.payment.postalOrder.submit"/></button>
				<button id="goToPreviousPath" type="button" class="aButton"><spring:message code="orders.payment.postalOrder.goToPreviousPath"/></button>
			</td>
		</tr>
	</table>
</form:form>